package gxdlxy.zx2201.case4_7;

public class Company {
    void addSalary(Staff staff) {
        System.out.println("涨薪前，工资为" + staff.salary);
        staff.addSalary();
        System.out.println("涨薪后，工资为" + staff.salary);
    }

    public static void main(String[] args) {
        Company 菊厂 = new Company();

        Staff 小张  = new Staff(3000);
        Manager 李经理 = new Manager(6000);

        菊厂.addSalary(小张);
        菊厂.addSalary(李经理);
    }
}
